//http://hihocoder.com/discuss/question/3573

//王岩的代码
#include<iostream>
#include<cmath>

struct Point
{
    Point(double x = 0, double y = 0) :x(x), y(y) {}
	double x;
	double y;
};

double dist(const Point &p1, const Point &p2)
{
	return (p1.x - p2.x)*(p1.x - p2.x) + (p1.y - p2.y)*(p1.y - p2.y);
}

Point farthest(const Point& o, double r)
{
	Point result(o);
	//最简单的四种情况
	if ((o.x + r) == std::floor(o.x + r))
	{
		result.x = o.x + r;
		result.y = o.y;
		return result;
	}
	else if ((o.y + r) == std::floor(o.y + r))
	{
		result.x = o.x;
		result.y = o.y + r;
		return result;
	}
	else if ((o.y - r) == std::floor(o.y - r))
	{
		result.x = o.x;
		result.y = o.y - r;
		return result;
	}
	else if ((o.x - r) == std::floor(o.x - r))
	{
		result.x = o.x - r;
		result.y = o.y;
		return result;
	}

	//考虑其他情况
	//if o.x & o.y are int,只需要考虑左上四分之一圆
	//if o.x is int，只需要考虑左半个圆
	//if o.y is int,只需要考虑上半个圆
	int xBegin = 0;
	int xEnd = 0;
	if (o.x == std::floor(o.x))
	{
		xBegin = std::ceil(o.x);
		xEnd = std::floor(o.x + r);
	}
	else
	{
		xBegin = std::ceil(o.x - r);
		xEnd = std::floor(o.x + r);
	}


	for (int tx = xEnd; tx >= xBegin; --tx)
	{
		double d = std::sqrt(r*r - (tx - o.x)*(tx - o.x));	
		
		int ty = std::floor(o.y + d);
		if (dist(Point(tx, ty), o) > dist(result, o))
		{
			result = Point(tx, ty);
		}

		if (o.y != std::floor(o.y))
		{
			ty = std::ceil(o.y - d);
			if (dist(Point(tx, ty), o) > dist(result, o))
			{
				result = Point(tx, ty);
			}
		}
	}

	return result;
}

int main()
{
	double x = 0;
	double y = 0;
	double r = 0;
	std::cin >> x >> y >> r;
	Point result = farthest(Point(x, y), r);
	std::cout << ((int)result.x) << ' ' << ((int)result.y) << std::endl;
	system("pause");
}
